gridview: Work around unexpected focus changes
authorMatthias Clasen <mclasen@redhat.com>
Thu, 6 Aug 2020 18:35:19 +0000 (14:35 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 6 Aug 2020 18:35:19 +0000 (14:35 -0400)
commitc13d70479bfa223d44c21c16cf8a071e85d8e726
tree6caeef9f21b01de9d5ae2c864effd2669877d6d1
parentecd50891ffe74900c15e56f53208061578801594
gridview: Work around unexpected focus changes

As things currently stand, we get events for focus changes
before the widget is allocated, and try to scroll in response.
Therefore, leaving n_columns at 0 until size-allocate leads
to plenty of division-by-zero. Just set it to 1 initially
to avoid that. This is a workaround for #3025.
gtk/gtkgridview.c